require('../less/advertisement.less')
document.ready(function () {
 //获取元素节点
   let adBtn=document.getElementById('adBtn')   
       let adCount = document.getElementById('adCount') 
       // 倒计时
//    计时器制作
    let timeId = window.setInterval(function () {
        let newNum = adCount.innerHTML - 1;
        if (newNum == 0) {
            clearInterval(timeId);//清除定时器
            window.location.href = './register.html'
        }
        // 把倒计时的值放到页面
        adCount.innerHTML = newNum
    }, 1000)

//点击跳过,实现页面跳转
adBtn.addEventListener('click',function(){
    window.location.href = './register.html'
})








})